﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FileTransferProtocol
{
    public delegate void OnEventDelegate(FileBlock eventMessage);
    public delegate void OnEventMessageDelegate(string eventMessage);
    public enum ConnectionState
    {
        Connected,
        Authenticated,
        Disconnected
    }
   
    public enum CommandType
    {
        UpInit,
        UpReady,
        UpBegin,
        UpTransfer,
        UpSucess,
        UpResume,
        UpEnd,
        DownInit,
        DownReady,
        DownBegin,
        DownTransfer,
        DownSucess,
        DownResume,
        DownEnd,
        FetchList,
        FetchDownFileInfo
    }
    [Serializable]
    public class NetSession
    {
        public NetSession(ConnectionState state)
        {
            State = state;
        }
        public ConnectionState State
        {
            get;
            set;
        }
        public CommandType CmdType
        {
            get;
            set;
        }
        public TransferHead Head
        {
            get;
            set;
        }
        public FileBlock FileBlock
        {
            get;
            set;
        }
        public string Content
        {
            get;
            set;
        }
    }
}
